# eric7.WebBrowser.UserAgent.UserAgentWriter

Module implementing a class to write user agent data files.

### Global Attributes

None

### Classes

UserAgentWriter | Class implementing a writer object to generate user agent data files.

### Functions

None

## UserAgentWriter

Class implementing a writer object to generate user agent data files.

### Derived from

QXmlStreamWriter

### Class Attributes

None

### Class Methods

None

### Methods

UserAgentWriter | Constructor
__write | Private method to write a user agent file.
write | Public method to write a user agent data file.

### Static Methods

None

#### UserAgentWriter (Constructor)

UserAgentWriter()

Constructor

#### UserAgentWriter.__write

__write(agents)

Private method to write a user agent file.

agents (dict)
  dictionary with user agent data (host as key, agent string as value)

Return:
  flag indicating success

Return Type:
  bool

#### UserAgentWriter.write

write(fileNameOrDevice, agents)

Public method to write a user agent data file.

fileNameOrDevice (str or QIODevice)
  name of the file to write or device to write to
agents (dict)
  dictionary with user agent data (host as key, agent string as value)

Return:
  flag indicating success

Return Type:
  bool

Up